<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>

    <th:block th:include="MainInterface/include :: common-css" />

</head>

<body class="fixed-left">
<div id="wrapper">
    <th:block th:include="MainInterface/include :: header-menu(3)" />
    <div class="dialog">
    <form id="bookList">
        <div class="dialog-box">
            <h1>修改状态</h1>
            <p>
                ID :
                <input  name="id" th:value="${statusList.id}" readonly unselectable="on">
            </p>
            <p>
                类型 :
                <input name="statusName" th:value="${statusList.statusName}" >
            </p>
        <div>
        <input style="width: 75px ; height : 50px " type="button" id="book_save" onclick="edit()" name="修改" value="修改">
<!--        <button id="book_save" onclick="edit()">提交</button>-->
        <button style="width: 75px ; height : 50px "><a href="/bookStatus">返回</a></button>
        </div>
        </div>
    </form>
    </div>
</div>
<th:block th:include="MainInterface/include :: foter" />
<th:block th:include="MainInterface/include :: common-js" />
</body>

<script>
    function edit(){
        $("#add").show();
        $.ajax({
            type:"post",
            url:"/bookStatus/saveOrUpdata",
            data:$("#bookList").serialize(),
            async:false,
            dataType: 'json',
            success:function (result) {
                console.log($("#bookList").serialize(),)
                if(result.code==0){
                    window.alert("修改成功");
                    window.location.href="/bookStatus"
                } else {
                    window.alert(result.msg || "添加失败");
                }

            }
        });
    }

</script>
<style>
    a:link{
        color: black;
        text-decoration: none;
    }
    a:visited {
        text-decoration: none;
        color: black;
    }
    a:hover {
        text-decoration: none;
        color: black;
    }
    a:active {
        text-decoration: none;
        color: black;
    }


</style>
</html>